iteration=0;
n=2;
p=(sqrt(n^2+4)-n)/2;                          %condition: p<1/n
vn=p*p;


%Start for the bomber:
t=0
dropped=0;
tdrop=calcBomberTime(vn,n);


%bomb the first place:
if(t==tdrop)
   bomber_vec=zeros(1,0) 
   dropped=1
end

%Start for the ship
start;                          %first step

t=t+1
last2_bomber=last               %memory for the last 'last'
Bomber

for i=1:100
    Ship
    t=t+1;
    Bomber

    %Look if bomber or ship wins
    if(dropped==1 && t==tdrop+2)
        if(compareVectors(vector,bomber_vec)==1)
            text='bomber wins'       
        else
            text='ship wins'
        end
        break
    end

    vector
end

